]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switcherPopup: Cancel window cycling with Tab
authorXavier Johnson <krinkodot22@hotmail.com>
Tue, 29 May 2018 04:52:24 +0000 (00:52 -0400)
committerFlorian Müllner <florian.muellner@gmail.com>
Sat, 14 Jul 2018 14:35:05 +0000 (14:35 +0000)
If the Escape key is used for a window/app cycler/switcher shortcut
(such as "Switch windows directly"), then there is no way to cancel
the switching/cycling operation with the keyboard.

This change allows cancelling such an operation by pressing the Tab
key, but only if Tab is not already being used by the current
switcher/cycler shortcut.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/315
js/ui/switcherPopup.js

index a53b1e6e9b6cc5324ab8f6b2c1a4c1531252dc2d..d645f1df9a9d8e2af57808ff49c06818a44f83d6 100644 (file)
@@ -192,7 +192,9 @@ var SwitcherPopup = new Lang.Class({
         if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
             return Clutter.EVENT_STOP;
 
-        if (keysym == Clutter.Escape)
+        // Note: pressing one of the below keys will destroy the popup only if
+        // that key is not used by the active popup's keyboard shortcut
+        if (keysym == Clutter.Escape || keysym == Clutter.Tab)
             this.destroy();
 
         return Clutter.EVENT_STOP;